import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";
import HomeView from "../views/test3/index.vue";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      component: HomeView,
      meta: { title: "home" },
      children: [
        {
          path: "/home",
          name: "homeIndex",
          component: () => import("@/views/test1/index.vue"),
          meta: {
            isShow: true, 
            title: "测试", 
            icon: "House", 
          },
        },
        {
          path: "/echarts",
          name: "echartIndex",
          // component: () => import('@/views/echarts/index.vue'),
          meta: {
            isShow: true,
            title: "Echarts页",
            icon: "House",
          },
          children: [
            {
              path: "/echarts/barCharts",
              name: "barCharts",
              component: () => import("@/views/test2/index2.vue"),
              meta: {
                title: "柱状图",
              },
            },
            {
              path: "/echarts/pieCharts4",
              name: "pieCharts4",
              component: () => import("@/views/test2/index2 copy.vue"),
              meta: {
                title: "饼图5",
              },
            },
            {
              path: "/echarts/pieCharts3",
              name: "pieCharts3",
              component: () => import("@/views/test2/index2 copy 2.vue"),
              meta: {
                title: "饼图4",
              },
            },
            {
              path: "/echarts/pieCharts2",
              name: "pieCharts2",
              component: () => import("@/views/test2/index2 copy 3.vue"),
              meta: {
                title: "饼图3",
              },
            },
            {
              path: "/echarts/pieCharts1",
              name: "pieCharts1",
              component: () => import("@/views/test2/index2 copy 4.vue"),
              meta: {
                title: "饼图2",
              },
            },
          ],
        },
      ],
    },
  ],
});

export default router;
